package cn.wsalix.weixin.req.entity;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.wsalix.weixin.message.req.ReqType;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "WX_REQ_MES_VOICE")
@Inheritance(strategy = InheritanceType.JOINED)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
public final class VoiceReqMsg extends BaseReqMsg {

    /**
	 * 
	 */
	private static final long serialVersionUID = 7906494890002826857L;
	private String mediaId;
    private String format;
    private String recognition;

    public VoiceReqMsg(String mediaId, String format, String recognition) {
        super();
        this.mediaId = mediaId;
        this.format = format;
        this.recognition = recognition;
        setMsgType(ReqType.VOICE);
    }

    public String getMediaId() {
        return mediaId;
    }

    public String getFormat() {
        return format;
    }

    public String getRecognition() {
        return recognition;
    }

}
